//business reg 1 step call validate
$(function(){
	$("#businessForm-1Step").validate({
		rules: {
			businessName: "required",
			businessNickName: "required",
			mamaAreaChlid :"required",
			businessAddress:{
				required : true,
				minlength :5
			},
			buinessPhone: {
				required: true,
				number: true
			},
			doBusinessTime: {
				required: true,
				date: true
			}
		},
		messages: {
			businessName: "请输入您的商户名称！",
			businessNickName: "请输入您的商户别名！",
			mamaAreaChlid:"请选择所属行业！",
			businessAddress:{
				required : "请输入您的商户地址！",
				minlength: "您输入的商户地址必须至少5字长！"
			},
			buinessPhone: {
				required: "请输入商户您的手机号码！",
				number: "您输入的手机号码必须为数字！"
			},
			doBusinessTime: {
				required: "请填写您的营业时间！",
				date: "您输入的时间必须为正确的日期！"
			}
		}
	});
	$("#businessForm-3Step").validate({
		rules: {
			companyName: "required",
			lawyer: "required",
			mamaAreaChlid :"required",
			certificateAddress:{
				required : true,
				minlength :5
			},
			// effectiveDate: {
				// required: true,
				// date: true
			// },
			shopManager: "required",
			shopManagerSFZ:{
				required : true,
				number :true
			},
			shopManagerMoblie:{
				required : true,
				number :true
			},
			shopManagerEmail:{
				required : true,
				email :true
			},
			shopManagerAddress:"required",
			shopManagerZip:{
				required: true,
				number: true
			},
			shopManagerPhone: {
				required: true,
				number: true
			}
			
		},
		messages: {
			companyName: "请输入您的企业名称！",
			lawyer: "请输入您的法人姓名！",
			mamaAreaChlid:"请选择所属行业！",
			certificateAddress:{
				required : "请输入您的营业执照住所！",
				minlength: "您输入的信息必须至少5字长！"
			},
			// effectiveDate: {
				// required: "请填写您的有效期！",
				// date: "您输入的时间必须为正确的日期！"
			// },
			shopManager:"请输入您的姓名",
			shopManagerSFZ:{
				required : "请输入您的身份证号码！",
				number: "您输入的不是有效身份证！"
			},
			shopManagerMoblie:{
				required : "请输入您的手机号码！",
				number: "您输入的不是有效号码！"
			},
			shopManagerEmail:{
				required : "请输入您的Email！",
				email: "您输入的不是有效的Email！"
			},
			shopManagerAddress:"请输入您的联系地址！",
			shopManagerZip:{
				required: "请输入邮编号码",
				number: "您输入的不是有效的邮编号码！"
			},
			shopManagerPhone: {
				required: "请输入您的联系电话！",
				number: "您输入的号码必须为数字！"
			}
		}
	});
	//edit business
	$("#edit-business").validate({
		rules: {
			businessName: "required",
			companyDesc: "required",
			mamaAreaChlid :"required",
			commodity:"required"
		},
		messages: {
			businessName: "请输入商户名称！",
			companyDesc: "请输入简洁的公司描述！",
			mamaAreaChlid:"请选择所属行业！",
			commodity :"请选择商品类型！"
		}
	});
	//pulish coupon
	$("#publishCouponForm").validate({
		rules: {
			businessName: "required",
			discount: "required",
			discountTitle :"required",
			discountDesc:"required",
			mamaAreaChlid :"required",
			commodity:"required",
			availableDate:{
				required: true,
				date:true
			}
			
		},
		messages: {
			businessName: "请输入商户名称！",
			discount: "请输优惠折扣！",
			discountTitle:"请选择优惠标题！",
			discountDesc :"请输入优惠说明！",
			mamaAreaChlid:"请选择所属行业！",
			commodity :"请选择商品类型！",
			availableDate:{
				required: "请输入有效日期！",
				date: "请输入正确的日期！"
			}
		}
	});
});
